from flask_restful import fields  # type: ignore

from libs.helper import  TimestampField

shop_base_fields = {
    "id": fields.String,
    "name": fields.String,
    "master_id": fields.String,
    "master_name": fields.String,
    "mobile": fields.String,
    "shop_type": fields.Integer,
    "industry": fields.Integer,
    "shop_status": fields.String,
    "transport_type":fields.Boolean,
    "is_distribution": fields.Boolean,
}

shop_fields = {
    "id": fields.String,
    "name": fields.String,
    "master_id": fields.String,
    "master_name": fields.String,
    "shop_type": fields.Integer,
    "intro": fields.String,
    "notice": fields.String,
    "industry": fields.Integer,
    "mobile": fields.String,
    "service_tel": fields.String,
    "lat":fields.Float,
    "lng":fields.Float,
    "address": fields.String,
    "province": fields.String,
    "city": fields.String,
    "district": fields.String,
    "zip_code": fields.String,
    "shop_logo_file_id": fields.String,
    "shop_photos": fields.Raw,
    "ShopPhotos": fields.List(fields.String),
    "open_time": fields.String,
    "shop_status": fields.String,
    "transport_type":fields.Boolean,
    "fixed_freight": fields.Integer,
    "full_free_shipping": fields.Integer,
    "created_at": TimestampField,
    "updated_at": TimestampField,
    "created_by": fields.String,
    "updated_by": fields.String,
    "is_distribution": fields.Boolean,
}

shop_pagnation_fields = {
    "total":fields.Integer,
    "has_more":fields.Boolean,
    "data":fields.List(fields.Nested(shop_base_fields))
}

shop_approval_fields = {
    "id": fields.String,
    "shop_id": fields.String,
    "approver": fields.String,
    "approver_name": fields.String,
    "content": fields.String,
    "approvaled": fields.Boolean(attribute="approve"),
    "created_at": TimestampField,
    "updated_at": TimestampField,
}